package com.zrrd.io.charStream;

import java.io.FileWriter;
import java.io.IOException;

/**
 * @author WanJl
 * @version 1.0
 * @title FileWriterDemo01
 * @description
 * @create 2023/10/14 17:00
 */
public class FileWriterDemo01 {
    public static void main(String[] args) throws IOException {
        FileWriter writer = new FileWriter("D://abc.txt",true);
        //写入一个字符
        //writer.write('a');
        //写入一个字符串
        //writer.write("hello world");
        char[] chars= {'a','n'};
        //写入一个字符串数组
        writer.write(chars);


        writer.close();
    }
}
